// ? 全局默认配置项
declare const window: any;
export const PUBLIC_KEY =
  "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIFIFs9u4Y4lEL9IfPGUJl82iv88ZJQq/JNjNu\n" +
  "yazQNyHA7qFH+i+6GbNCjkUXEpdyXCliMWELRS2WpQUn8wn/XGmhELXzhs9C+JJT23+tEYLsnB2m\n" +
  "EPG7R1T1/x4aaCVxPiV+A9trvkfa1iVydWhEwl08gw65pDGnD0fJM6XbAwIDAQAB";
// 首页地址（默认）
export const HOME_URL: string = "/home/index";

// 登录页地址（默认）
export const LOGIN_URL: string = "/login";

// 默认主题颜色
export const DEFAULT_PRIMARY: string = "#3C6AA1";

// 路由白名单地址（必须是本地存在的路由 staticRouter.ts 中）
export const ROUTER_WHITE_LIST: string[] = ["/500"];

// 高德地图 key
export const AMAP_MAP_KEY: string = "";

// 百度地图 key
export const BAIDU_MAP_KEY: string = "";

export const VITE_API_URL =
  import.meta.env.VITE_USER_NODE_ENV === "development"
    ? import.meta.env.VITE_API_URL
    : window.VITE_API_URL || import.meta.env.VITE_API_URL;

export const MENU_LIST = [
  {
    id: 1,
    title: "发卡中心",
    name: 1
  },
  {
    id: 2,
    title: "门禁",
    name: 2
  },
  {
    id: 3,
    title: "梯控",
    name: 7
  },
  {
    id: 4,
    title: "智能锁",
    name: 8
  },
  // {
  //   id: 5,
  //   title: "消费",
  //   name: 4
  // },
  // {
  //   id: 6,
  //   title: "接口中心",
  //   name: 14
  // },
  {
    id: 7,
    title: "系统管理",
    name: 20
  }
];

// 菜单白名单  不需要菜单权限校验
export const WHITE_MENU_LIST = [];

// 过滤不包含菜单权限的特殊情况
export const FILTER_MENU_LIST = new Map([]);

export const msgMap = new Map([
  [1, "已注册！"],
  [2, "部门必须输入！"],
  [3, "编号必须输入！"],
  [4, "姓名必须输入！"],
  [5, "持卡类别必须选择！"],
  [6, "无信息不能更新！"],
  [7, "无信息不能注销！"],
  [8, "确认要注销此记录?"],
  [9, "请选择记录！"],
  [10, "密码不一致！"],
  [11, "卡号长度不足8位！"],
  [13, "无法找到到发卡器，请确认是否下载运行发卡服务程序！"],
  [14, "无法读到卡！"],
  [15, "读卡失败！"],
  [16, "无服务程序！"],
  [17, "确认要销卡吗？"],
  [18, "只能选择一个记录"],
  [19, "发卡成功！"],
  [20, "换卡成功！"],
  [21, "写卡失败！"],
  [22, "读卡器密码验证失败！"],
  [23, "发卡失败，确认发卡设备！"],
  [24, "卡类不支持！"],
  [25, "UID不一致"],
  [26, "未建立门禁应用"],
  [27, "写门禁应用失败"],
  [28, "写卡中......"],
  [29, "密钥导入成功！"],
  [30, "该卡不是密钥母卡！"],
  [33, "传感器上没有手指！"],
  [34, "设备连接失败！"],
  [35, "生成指纹特征错！"],
  [36, "获取指纹错！"],
  [37, "合并指纹特征错！"],
  [38, "上载指纹特征错！"],
  [39, "未知错误！"],
  [40, "下载指纹特征错！"],
  [41, "存储指纹模板错！"],
  [42, "扫描指纹图像错！"],
  [43, "密码不能为空！"],
  [44, "激活成功！"],
  [45, "查询不到此卡对应人员！"],
  [-1, "软件试用期已过，请与软件供应商联系！"]
]);

export const printMsgMap = new Map([
  [3, "录入指纹图像失败"],
  [4, "指纹图像太干、太淡而生不成特征"],
  [5, "指纹图像太湿、太糊而生不成特征"],
  [6, "指纹图像太乱而生不成特征"],
  [7, "指纹图像正常，但特征点太少（或面积太小）而生不成特征"],
  [9, "没搜索到指纹"],
  [10, "特征合并失败"],
  [23, "残留指纹或两次采集之间手指没有移动过"]
]);
